Replication files for “Economic Shocks and the Development of Immigration Attitudes“
British Journal of Political Science
Dillon L. Laaker

In order to replicate the analyses in the paper, please ensure that you have set the working directory to the appropriate folder where you have saved the data files.

The replication archive contains four program:

“ess_incomeimpute.do” - Imputes income data following method cited in text.
“ess_clean.R” - Contains all code to construct and clean ESS data. 
“ess_main.R” - Analyses from main article and constructs tables/figures
“ess_appendix.R” - Analyses from appendix and constructs tables/figures

The replication archive contains the following data sets:

“ess_raw.dta” - raw ESS survey data
“ess_incomefixed.dta” - dataset with imputed income values. Created from file “ess_incomeimput.do”
“ess_main.Rdata” - dataset used to conduct all analyses. Created from “ess_clean.R”
“ess_gdpshock.csv” - identifies economic shocks
“ess_unemployment.csv” - unemployment rates in sample countries
“Isco.csv” - ISCO codes
“mpd2020.csv” - historical economic data from Maddison project
“rti.dta” - routine task index